-- GENERATED SPELL FOR [Delmanis the Hated] --


function spell0_3662(pUnit, Event) --@Flame Blast,n/a--
pUnit:FullCastSpellOnTarget(7101,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3662', 7000, 1)
end

function spell1_3662(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20792,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3662', 7000, 1)
end

function Sorts_3662(pUnit, Event)
local choix_sorts_3662 = math.random(0, 1)
if choix_sorts_3662 == 0 then
pUnit:RegisterEvent('spell0_3662', 1, 1)
end
if choix_sorts_3662 == 1 then
pUnit:RegisterEvent('spell1_3662', 1, 1)
end
end

function mob3662_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3662', math.random(1500, 3000), 1)
end

function mob3662_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3662_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3662_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3662, 1, 'mob3662_Action')
RegisterUnitEvent(3662, 2, 'mob3662_Leave')
RegisterUnitEvent(3662, 3, 'mob3662_Kill')
RegisterUnitEvent(3662, 4, 'mob3662_Die')
